package top.yokey.android.fragment;

import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import androidx.annotation.NonNull;
import androidx.appcompat.widget.AppCompatImageView;
import androidx.fragment.app.Fragment;

import top.yokey.android.R;
import top.yokey.android.activity.DynamicAddActivity;

public class HomeFragment extends Fragment {

    private AppCompatImageView addImageView;

    public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View root = inflater.inflate(R.layout.fragment_home, container, false);
        addImageView = root.findViewById(R.id.addImageView);
        initEvent();
        return root;
    }

    private void initEvent() {

        addImageView.setOnClickListener(view -> startActivity(new Intent(getActivity(), DynamicAddActivity.class)));

    }

}
